﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using MySql.Data.Entity;

namespace MarkdownWeb.Models
{
    public class WikiContent
    {
        [Key]
        public int Id { get; set; }
        [MaxLength(512)]
        public string Title { get; set; }
        public DateTime CreateTime { get; set; }
        public string Content { get; set; }
        [MaxLength(64)]
        public string Creater { get; set; }
        public DateTime LastEditTime { get; set; }
    }
    [DbConfigurationType(typeof(MySqlEFConfiguration))]
    public class WikiContentContext:DbContext
    {
        public WikiContentContext():base("DB") { }
        public DbSet<WikiContent> Wikis { get; set; }
    }
}